Imports Clo = Enhancements.Core.Logging
Imports Gen = System.Collections.Generic
Imports Iou = System.IO
Imports Ref = System.Reflection
Imports Reg = System.Text.RegularExpressions
Imports Sys = System
Imports Tex = System.Text
Imports Xsd = System.Xml.Schema
Imports W3c = System.Xml

Namespace Enhancements.Basic.Primitives
    ''' <summary>Represents the interval where an occurrence was found.</summary>
    <Serializable(), DebuggerStepThrough()> _
    Public NotInheritable Class Occurrence

        Friend Sub New(ByVal _beginIndex As Sys.Int32, ByVal _endIndex As Sys.Int32)
            _beginIndex.IsInRange("_beginIndex", 0, Sys.Int32.MaxValue, True)
            _endIndex.IsInRange("_endIndex", _beginIndex, Sys.Int32.MaxValue, True)

            BeginIndex = _beginIndex
            EndIndex = _endIndex
        End Sub

        Private __BeginIndex As System.Int32 = 0
        ''' <summary>The interval's beginning index.</summary>
        Public Property BeginIndex() As System.Int32
            Get
                Return __BeginIndex
            End Get
            Private Set(ByVal _value As System.Int32)
                __BeginIndex = _value
            End Set
        End Property

        Private __EndIndex As System.Int32 = 0
        ''' <summary>The interval's ending index.</summary>
        Public Property EndIndex() As System.Int32
            Get
                Return __EndIndex
            End Get
            Private Set(ByVal _value As System.Int32)
                __EndIndex = _value
            End Set
        End Property

    End Class
End Namespace
